package com.yuexun.dhdoctor.module.contractmanage.adapter;

import android.widget.AbsListView;

import com.yuexun.dhdoctor.R;
import com.yuexun.dhdoctor.module.contractmanage.bean.HospitalizationAdviceBean;

import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;

import java.util.Collection;

/**
 * Created by Administrator on 2018/12/3 0003.
 */

public class HospitalAdviceAdapter extends KJAdapter<HospitalizationAdviceBean.RowsBean>{
    public HospitalAdviceAdapter(AbsListView view, Collection<HospitalizationAdviceBean.RowsBean> mDatas, int itemLayoutId) {
        super(view, mDatas, itemLayoutId);
    }

    @Override
    public void convert(AdapterHolder adapterHolder, HospitalizationAdviceBean.RowsBean rowsBean, boolean b) {
        adapterHolder.setText(R.id.item_name,rowsBean.getItem_name()+" "+rowsBean.getQty()+rowsBean.getUnit());
        adapterHolder.setText(R.id.item_way,"给药方式:"+rowsBean.getDrug_use_name());
        adapterHolder.setText(R.id.item_per,"每次:"+rowsBean.getDrug_ones_dose()+rowsBean.getDrug_dose_unit());
        adapterHolder.setText(R.id.item_time,":"+rowsBean.getOrder_dtime());
    }
}
